package com.baizhi.hospital.service.impl;

import com.baizhi.hospital.annotation.LogAnnotation;
import com.baizhi.hospital.dao.LogDao;
import com.baizhi.hospital.entity.Log;
import com.baizhi.hospital.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public class LogServiceImpl implements LogService {
    @Autowired(required = false)
    private LogDao logDao;
    @Override
    //@LogAnnotation(value = "查询药品信息",type = "selectLogByPage")
    public Map selectLogByPage(int page, int limit) {
        int offset=(page-1)*limit;
        List<Log> logs = logDao.selectLogByPage(offset, limit);
        int count = logDao.selectCount();
        Map map=new HashMap();
        map.put("code",0);
        map.put("msg","");
        map.put("count",count);
        map.put("data",logs);
        return map;
    }
}
